﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for ManageLibrary
/// </summary>
public class ManageLibrary
{
	public ManageLibrary()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public Library getLibrary(String ID)
    {
        DatabaseAccess dbAccess = new DatabaseAccess();

        Library lib = dbAccess.getLibrary(ID);

        return lib;
    }
    public void updateLibrary(Library lib)
    {
        DatabaseAccess dbAccess = new DatabaseAccess();

        dbAccess.updateLibrary(lib);
    }

    //gets the checkout length for a library
    public int getCheckoutLength(String libId)
    {
        DatabaseAccess dbAccess = new DatabaseAccess();
        Library lib = dbAccess.getLibrary(libId);
        return lib.CheckoutLength;
    }
}
